import API from './api'
import request from '../utils/request'

export const addRecordData = ({...allRecord}) => request({
  url: API.RECORDS_API,
  method: 'POST',
  data: {
    ...allRecord,
  },
})

// 获取所有操作记录
export const getRecordData = () => request({
  url: API.RECORDS_API,
  method: 'GET',
})

// 查询内容综合版
export const queryRecordData = ({...options}) => request({
  url: API.RECORDS_API,
  method: 'GET',
  params: {
    ...options,
  },
})

// 删除记录
export const deleteRecord = (id) => request({
  url: API.RECORDS_API + '/' + id,
  method: 'DELETE',
})

